from selenium import webdriver
from lxml import etree
from time import sleep
url='https://search.jd.com/search?keyword=%E5%8D%8E%E4%B8%BA%E6%89%8B%E6%9C%BA&qrst=1&suggest=2.def.0.V14--38s0&wq=%E5%8D%8E%E4%B8%BA%E6%89%8B%E6%9C%BA&ev=exbrand_%E5%8D%8E%E4%B8%BA%EF%BC%88HUAWEI%EF%BC%89%5E559_103811%5E&psort=5'
chrome=webdriver.Chrome()
chrome.get(url)

js='document.documentElement.scrollTop=100000'
chrome.execute_script(js)
sleep(3)
html=chrome.page_source
e=etree.HTML(html)
prices=e.xpath('//div[@id="J_goodsList"]/ul[@class="gl-warp clearfix"]/li/div/div[@class="p-price"]/strong/i/text()')
names=e.xpath('//div[@id="J_goodsList"]/ul[@class="gl-warp clearfix"]/li/div/div[@class="p-name p-name-type-2"]/a/em')
for name,price in zip(names,prices):
    print(name.xpath('string(.)'),":",price)




